package com.product.miaosha.dao;

import com.product.miaosha.entity.MiaoshaActivityEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.product.miaosha.vo.GoodsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 
 * 
 * @author brh
 * @email sunlightcs@gmail.com
 * @date 2022-02-22 16:55:10
 */
@Mapper
public interface MiaoshaActivityDao extends BaseMapper<MiaoshaActivityEntity> {

    @Select("select * from goods g left join miaosha_activity a on g.id=a.goods_id where goods_id=#{id}")
    GoodsVo shopInfo(@Param("id") Integer id);

    @Select("select * from miaosha_activity where goods_id=#{gid}")
    MiaoshaActivityEntity MiaoShaGoodsInfo(@Param("gid") Long gid);

}
